home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / CustomWriterGX / CustomWriterGX.make < prev    next >
Encoding:
Text File  |  1996-06-15  |  5.6 KB  |  177 lines  |  [TEXT/MPS ]

  1. #
  2. #    FILENAME
  3. #        CustomWriter GX.make
  4. #
  5. #    DESCRIPTION
  6. #        Makefile for the CustomWriter GX driver.
  7. #
  8. #    COPYRIGHT
  9. #        Copyright © 1995 Apple Computer, Inc.
  10. #        All rights reserved.
  11. #    
  12. #    Modification history
  13. #        06/14/96 - cn              -    Updated to support MPW Pro #19.
  14. #
  15. #        10/04/95 - David Hayward -    Version 1.0.4 modified code so that
  16. #                                    the driver can be build under MPW,
  17. #                                    Metrowerks, and Symantec.  In general,
  18. #                                    all that was required to do this was 
  19. #                                    to add an inline-assembly jumptable
  20. #                                    and to store all globals off of the
  21. #                                    message manager instance context.
  22. #                                    Also made a few changes so that the
  23. #                                    driver can be rebuilt to support any
  24. #                                    resolution by changing the #defines
  25. #                                    kResolution and kPatStretch in
  26. #                                    "CommonDefines.h"
  27. #
  28. #        06/14/95 - Dave Hersey -    Version 1.0.3 to fix a bug in
  29. #                                    CustomBufferingAndIO.c when creating
  30. #                                    high-res PICTs, and to make the size
  31. #                                    of buffers more flexible.
  32. #
  33. #        05/26/95 - Dave Hersey -    Version 1.0.2 to add the new 'outp'
  34. #                                    desktop printer resource in NewApp.c.
  35. #
  36. #        05/03/95 - Dave Hersey -    Version 1.0.1 to fix some minor bugs in
  37. #                                    CustomBufferingAndIO.c.
  38. #
  39. #        01/14/95 - Dave Hersey -    Created from the shell of a hollowed-out
  40. #                                    ImageWriter driver.
  41. #
  42.  
  43. #========== Directories Containing Source and Object Files ==========
  44.  
  45. ObjDir                    = :Objects:
  46. SrcDir                    = 
  47. DestDir                    = 
  48. GXLibs                    = {MPW}GXLibraries
  49. GXCompatIntf            = {MPW}GXCompatibilityInterfaces
  50.  
  51. #========== Compiler Options ==========
  52.  
  53. AsmOptions                = -sym off -i "{CIncludes}" -i "{GXLibs}" -i "{GXCompatIntf}" -case obj
  54. COptions                = -sym off -i "{CIncludes}" -i "{GXLibs}" -i "{GXCompatIntf}" -mbg full -b2
  55. RezOptions                = -i "{RIncludes}" -d SystemSevenOrLater=1
  56. LinkOptions                = -ra =resSysHeap,resPurgeable -p -map
  57.  
  58.  
  59. DriverName                 = "CustomWriterGX"
  60. DriverCreator             = 'cuWR'
  61. NewSegID                = 0
  62. OldSegID                = 1
  63.  
  64.  
  65. ### Compile and assemble statements ###
  66.  
  67. "{ObjDir}"OldApp.c.o ƒ "{SrcDir}"OldApp.c
  68. #    Echo "{DriverName}: Compiling old application"
  69.     SC {COptions} "{SrcDir}"OldApp.c -o {Targ}
  70.  
  71. "{ObjDir}"OldApp.a.o    ƒ     "{SrcDir}"OldApp.a
  72. #    Echo "{DriverName}: Assembling old app jump table"
  73.     Asm {AsmOptions} "{SrcDir}"OldApp.a -o {Targ}
  74.  
  75. "{ObjDir}"NewApp.c.o    ƒ "{SrcDir}"NewApp.c "{SrcDir}"NewApp.h "{SrcDir}"CommonDefines.h
  76. #    Echo "{DriverName}: Compiling new application"
  77.     SC {COptions} "{SrcDir}"NewApp.c -o {Targ}
  78.  
  79. "{ObjDir}"NewApp.a.o    ƒ     "{SrcDir}"NewApp.a
  80. #    Echo "{DriverName}: Assembling new app jump table"
  81.     Asm {AsmOptions} "{SrcDir}"NewApp.a -o {Targ}
  82.  
  83. "{ObjDir}"ChooserLDEF.c.o    ƒ "{SrcDir}"ChooserLDEF.c "{SrcDir}"ChooserLDEF.h
  84. #    Echo "{DriverName}: Compiling Chooser LDEF"
  85.     SC {COptions} "{SrcDir}"ChooserLDEF.c -o {Targ}
  86.  
  87. "{ObjDir}"ChooserPACK.c.o    ƒ "{SrcDir}"ChooserPACK.c
  88. #    Echo "{DriverName}: Compiling Chooser PACK"
  89.     SC {COptions} "{SrcDir}"ChooserPACK.c -o {Targ}
  90.  
  91. "{ObjDir}"ChooserPACK.a.o    ƒ     "{SrcDir}"ChooserPACK.a
  92. #    Echo "{DriverName}: Assembling Chooser PACK"
  93.     Asm {AsmOptions} "{SrcDir}"ChooserPACK.a -o {Targ}
  94.  
  95. "{ObjDir}"GlobalData.c.o    ƒ "{SrcDir}"GlobalData.c "{SrcDir}"GlobalData.h
  96. #    Echo "{DriverName}: Compiling global data support"
  97.     SC {COptions} "{SrcDir}"GlobalData.c -o {Targ}
  98.  
  99.  
  100. ### Rez statements ###
  101.  
  102. "{DestDir}"{DriverName} ƒƒ "{SrcDir}"OldApp.r "{SrcDir}"CommonDefines.h
  103. #    Echo "{DriverName}: Rezzing old application"
  104.     Rez {RezOptions} -append "{SrcDir}"OldApp.r -o {Targ}
  105.         
  106. "{DestDir}"{DriverName} ƒƒ "{SrcDir}"NewApp.r "{SrcDir}"CommonDefines.h
  107. #    Echo "{DriverName}: Rezzing new application"
  108.     Rez {RezOptions} -append "{SrcDir}"NewApp.r -o {Targ}
  109.  
  110. "{DestDir}"{DriverName} ƒƒ "{SrcDir}"ChooserPACK.r
  111. #    Echo "{DriverName}: Rezzing Chooser PACK resources"
  112.     Rez {RezOptions} -append "{SrcDir}"ChooserPACK.r -o {Targ}
  113.  
  114. "{DestDir}"{DriverName} ƒƒ "{SrcDir}"ChooserLDEF.r "{SrcDir}"ChooserLDEF.h
  115. #    Echo "{DriverName}: Rezzing Chooser LDEF resources"
  116.     Rez {RezOptions} -append "{SrcDir}"ChooserLDEF.r -o {Targ}
  117.  
  118.  
  119. ### Link statements ###
  120.  
  121. "{DestDir}"{DriverName} ƒƒ  "{ObjDir}"NewApp.a.o "{ObjDir}"NewApp.c.o "{ObjDir}"GlobalData.c.o
  122. #    Echo "{DriverName}: linking new API"
  123.     Link                                        ∂
  124.         "{ObjDir}"NewApp.a.o                    ∂
  125.         "{ObjDir}"NewApp.c.o                    ∂
  126.         "{ObjDir}"GlobalData.c.o                ∂
  127.         "{Libraries}"Interface.o                ∂
  128.         "{Libraries}"MacRuntime.o                ∂
  129.         {LinkOptions}                            ∂
  130.         -rt 'pdvr'={NewSegID}                    ∂
  131.         -sg NewAppOverrides                        ∂
  132.         -m SD_JumpTable                            ∂
  133.         -o {Targ}
  134.  
  135. "{DestDir}"{DriverName} ƒƒ "{ObjDir}"OldApp.a.o "{ObjDir}"OldApp.c.o
  136. #    Echo "{DriverName}: linking old API"
  137.     Link                                        ∂
  138.         "{ObjDir}"OldApp.a.o                    ∂
  139.         "{ObjDir}"OldApp.c.o                    ∂
  140.         {LinkOptions}                            ∂
  141.         -rt 'pdvr'={OldSegID}                    ∂
  142.         -sg OldAppOverrides                        ∂
  143.         -m SD_JumpTable                            ∂
  144.         -o {Targ}
  145.  
  146. "{DestDir}"{DriverName} ƒƒ "{ObjDir}"ChooserPACK.a.o "{ObjDir}"ChooserPACK.c.o
  147. #    Echo "{DriverName}: Linking PACK"
  148.     Link                                        ∂
  149.         "{ObjDir}"ChooserPACK.a.o                ∂
  150.         "{ObjDir}"ChooserPACK.c.o                ∂
  151.         -rt PACK=-4096                            ∂
  152.         -sg ChooserPACK                            ∂
  153.         -m PACKENTRY                            ∂
  154.         -o {Targ}
  155.  
  156. "{DestDir}"{DriverName} ƒƒ "{ObjDir}"ChooserLDEF.c.o
  157. #    Echo "{DriverName}: Linking LDEF"
  158.     Link                                        ∂
  159.         "{ObjDir}"ChooserLDEF.c.o                ∂
  160.         -rt LDEF=-4096                            ∂
  161.         -sg ChooserLDEF                            ∂
  162.         -m MAIN                                    ∂
  163.         -o {Targ} 
  164.  
  165.  
  166. ### Set Attributes ###
  167.  
  168. "{DestDir}"{DriverName} ƒƒ                                                            ∂
  169.     "{ObjDir}"ChooserLDEF.c.o  "{SrcDir}"ChooserLDEF.r                                ∂
  170.     "{ObjDir}"ChooserPACK.a.o  "{ObjDir}"ChooserPACK.c.o  "{SrcDir}"ChooserPACK.r    ∂
  171.     "{ObjDir}"OldApp.a.o       "{ObjDir}"OldApp.c.o       "{SrcDir}"OldApp.r        ∂
  172.     "{ObjDir}"NewApp.a.o       "{ObjDir}"NewApp.c.o       "{SrcDir}"NewApp.r        ∂
  173.     "{SrcDir}"CommonDefines.h                                                        ∂
  174.     "{ObjDir}"GlobalData.c.o
  175. #    Echo "{DriverName}: Setting type/creator  {NewerDeps}"
  176.     SetFile -a Bi -t 'pdvr' -c {DriverCreator} {Targ}
  177.